using System;
using System.Collections.Generic;
using NHibernate.Mapping.Attributes;
using A = NHibernate.Mapping.Attributes;

namespace SuperMarketManagement.Entity
{

    [Class(Name = "SaleProgram")]
    public class SaleProgram
    {
        [Id(1, Name = "AutoId"), Generator(2, Class = "native")]
        public virtual long AutoId { get; set; }
        [Property]
        public virtual DateTime StartDate { get; set; }
        [Property]
        public virtual DateTime EndDate { get; set; }
        [Property]
        public virtual double MinimumInvoiceTotal { get; set; }
        [Property]
        public virtual double DiscountRate { get; set; }

        public SaleProgram()
        {
        }

        public SaleProgram(DateTime startDate, DateTime endDate, double minimumInvoiceTotal, double discountRate)
        {
            StartDate = startDate;
            EndDate = endDate;
            MinimumInvoiceTotal = minimumInvoiceTotal;
            DiscountRate = discountRate;
        }
    }
}